<?php
namespace QinglongApp\Playday\Http\Controller;

use Qinglong\Framework\Io\Input;
use Qinglong\Framework\Io\Output;

class Announcement {
    public function Announcement(Input $input, Output $output) {
        //申明变量
            $error = 0;
            $msg = '';
            $notice['creator'] = $input['creator'];
            /*$notice['content'] = $input['content'];
            $notice['start'] = $input['start'];
            $notice['end'] = $input['end'];
            $notice['allow_days'] = $input['allow_days'];
            $notice['weekly_allow_days'] = $input['weekly_allow_days'];*/
        //输入验证

        //数据处理
            if (!$error) {
                $Announcement = app() -> make(\QinglongApp\Playday\Src\Service\Announcement::class);
                $first = $Announcement -> deliver_announcement($notice);
            }
        //数据输出
        $output['first'] = $first;
    }
}